package com.matpala.practico1.a;

public class GeneradorMixto extends Generador {
	
	private int c;
	
	public int getC() {
		return c;
	}
	public void setC(int c) {
		this.c = c;
	}
	
	public GeneradorMixto(int a, int x, int c, int mod) {
		super(a, x, mod);
		this.c = c;
	}
	@Override
	public int generar() {
		setX(((getA() * getX()) + c) % getMod());
		return getX();
	}
	
}
